import Vue from 'vue'
import App from './App.vue'
import router from './router'
import 'element-ui/lib/theme-chalk/index.css'
import ElementUI from 'element-ui'
import 'wowjs/css/libs/animate.css'
import '/src/static/js/iconfont'
Vue.config.productionTip = false
Vue.use(ElementUI);
// 动画 animate.css
require('animate.css/animate.min.css');
// 滚动动画 wow.js
import {WOW} from 'wowjs'
Vue.prototype.$wow = new WOW({
  boxClass: 'wow', // default
  animateClass: 'animated', // default
  offset: 150, // default
  mobile: true, // default
  live: false,

  // live为true时，控制台会提示：MutationObserver is not supported by your browser. & WOW.js cannot detect dom mutations, please call .sync() after loading new content.
  callback: function(box) {
    console.log("WOW: animating <" + box.tagName.toLowerCase() + ">")
  }
})


new Vue({
  router,
  render: h => h(App)
}).$mount('#app')


// router.beforeEach((to,from,next) => {
//   var is = false;
//   if(to.matched.some(_ => _.meta.requireLogin)){
//     if(is){
//       next();
//     }else{
//       next("/")
//     }
//   }else{
//     next();
//   }
// })